package org.item.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.item.common.bean.SysPermission;
import org.item.common.bean.SysRole;

import java.util.List;

@Mapper
public interface RoleMapper extends BaseMapper<SysRole> {
    @Select("select * from sys_permission where id in (select permission_id from sys_role_permission where role_id =#{roleid})")
    List<SysPermission> getPermissionsByRoleId(@Param("roleid") Integer roleid);
}
